import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home'
import Find from '@/views/find'
import Me from '@/views/my'
import Login from '@/views/login'
import Passwordl from '@/views/passwordl'
import Message from '@/views/message'
import Register from '@/views/register'

import hotNews from '@/views/hotNews'
// 发票
import Reporting from '@/views/reporting/reporting'
import Electronics from '@/views/reporting/electronics'
import Page from '@/views/reporting/page'
import Pagelist from '@/views/reporting/pageList'
import Elelist from '@/views/reporting/eleList'
import Ele_perList from '@/views/reporting/ele_perList'
import Page_perList from '@/views/reporting/page_perList'

import Record from '@/views/reporting/record'
import Invoicedetail from '@/views/reporting/invoiceDetail'
import Submissionsuccess from '@/views/reporting/submissionSuccess'
// 缴费
import Paydetail from '@/views/pay/payDetail'
import Paymentrecord from '@/views/pay/paymentRecord'
//报修
import Repair from '@/views/onlineRepair/repair'
import Successrepair from '@/views/onlineRepair/successRepair' 
// 我的
import Account from '@/views/account/account'
import Iphone from '@/views/account/iphone'
import Password from '@/views/account/password'
import Repairrecord from '@/views/onlineRepair/Repairrecord'
// 发现
import Notice from '@/views/findContent/notice'
import Dot from '@/views/findContent/dot'
import Policy from '@/views/findContent/policy'
import Knowledge from '@/views/findContent/knowledge'
import noticeDetail from '@/views/findContent/noticeDetail'

import Weather from '@/components/weather'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/Login'
    },
    {
      path: '/Login', // 登录
      name: 'Login',
      component: Login,
      children: [
        {
          path: '',
          redirect: '/Login/Passwordl'
        },
        {
          path: '/Login/Passwordl', // 密码登录
          name: 'Passwordl',
          component: Passwordl
        },
        {
          path: '/Login/Message', // 短信登录
          name: 'Message',
          component: Message
        }
      ]
    },
    {
      path: '/Register', // 注册
      name: 'Register',
      component: Register
    },
    {
      path: '/Home', // 首页
      name: 'Home',
      component: Home
    },
    {
      path: '/Home/hotNews',
      name: 'hotNews',
      component: hotNews
    },
    {
      path: '/Home/Reporting', // 电子发票
      name: 'Reporting',
      component: Reporting,
      children: [
        {
          path: '',
          redirect: 'Electronics' // 电子发票
        },
        {
          path: 'Electronics',
          name: 'Electronics',
          component: Electronics,
          children: [
            {
              path: '',
              redirect: 'Elelist'
            },
            {
              path: 'Elelist',
              name: 'Elelist',
              component: Elelist
            },
            {
              path: 'Ele_perList',
              name: 'Ele_perList',
              component: Ele_perList
            }
          ]
        },
        {
          path: 'Page', // 纸质发票
          name: 'Page',
          component: Page,
          children: [
            {
              path: '',
              redirect: 'Pagelist'
            },
            {
              path: 'Pagelist',
              name: 'Pagelist',
              component: Pagelist
            },
            {
              path: 'Page_perList',
              name: 'Page_perList',
              component: Page_perList
            }
          ]
        }
      ]
    },
    {
      path: '/Home/Record', // 发票记录
      name: 'Record',
      component: Record
    },
    {
      path: '/Home/Invoicedetail', //电子发票详情
      name: 'Invoicedetail',
      component: Invoicedetail
    },
    {
      path: '/Home/Submissionsuccess', // 发票提交成功
      name: 'Submissionsuccess',
      component: Submissionsuccess
    },
    {
      path: '/Home/Paydetail', // 在线支付
      name: 'Paydetail',
      component: Paydetail
    },
    {
      path: '/Home/Paymentrecord', // 缴费记录
      name: 'Paymentrecord',
      component: Paymentrecord
    },
    {
      path: '/Home/Repair', // 在线报修
      name: 'Repair',
      component: Repair
    },
    {
      path: '/Home/Successrepair', // 报修成功
      name: 'Successrepair',
      component: Successrepair
    },
    {
      path: '/Home/Account', // 账户管理
      name: 'Account',
      component: Account
    },
    {
      path: '/Home/Iphone', // 修改手机号
      name: 'Iphone',
      component: Iphone
    },
    {
      path: '/Home/Password', // 修改密码
      name: 'Password',
      component: Password
    },
    {
      path: '/Find/Weather', //天气预报
      name: 'Weather',
      component: Weather
    },
    {
      path: '/Find',
      name: 'Find',
      component: Find
    },
    {
      path: '/Find/Notice', // 公告
      name: 'Notice',
      component: Notice
    },
    {
      path: '/Notice/noticeDetail', // 公告详情
      name: 'noticeDetail',
      component: noticeDetail
    },
    {
      path: '/Find/Dot', // 网点
      name: 'Dot',
      component: Dot
    },
    {
      path: '/Find/Policy', // 政策法规
      name: 'Policy',
      component: Policy
    },
    {
      path: '/Find/Knowledge', // 用热知识
      name: 'Knowledge',
      component: Knowledge
    },
    {
      path: '/Me',
      name: 'Me',
      component: Me
    },
    {
      path: '/My/Repairrecord',
      name: 'Repairrecord',
      component: Repairrecord
    }
  ]
})
